import React from 'react';
import './style.less';

export default ({city, onClickIcon, onClickItem, cityData}) => {
  return (
    <div className="city-list">
      <section><i onClick={onClickIcon}>返回</i><h1>选择城市</h1></section>
      <section>{city.name}</section>
      <dl>
        <dt>热门城市</dt>
        {
          cityData.map((item, index) => <dd key={item.id} onClick={() => onClickItem(index)}>{item.name}</dd>)
        }
      </dl>
    </div>
  )
}